package com.lmax.disruptor.java.DGA;

public class TaskChain
{
    public Digraph digraph;

    private Task task;

    public TaskChain(final Digraph digraph)
    {
        this.digraph = digraph;
    }

    public TaskChain cursor(final Task task)
    {
        this.task = task;
        return this;
    }

    public TaskChain then(final Task task)
    {
        digraph.addEdge(task, this.task);
        return this;
    }

}